//
//  ViewController.m
//  Demo01new
//
//  Created by Dev on 15/10/9.
//  Copyright © 2015年 Dev. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()
@property (weak, nonatomic) IBOutlet UILabel *showPhoneNumberLabel;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
}
- (IBAction)callPhoneNumber:(id)sender {
    UIButton *button = (UIButton *)sender;
    [sender setBackgroundImage:[UIImage imageNamed:@"logo.png"] forState:UIControlStateHighlighted];
    self.showPhoneNumberLabel.text = [NSString stringWithFormat:@"%@%@",self.showPhoneNumberLabel.text,button.titleLabel.text];
}

- (IBAction)deleteNumber:(id)sender {
    NSString *string = self.showPhoneNumberLabel.text;
    if (string.length > 0 ) {
        NSString *string2 = [string substringWithRange:NSMakeRange(0, string.length - 1)];
        self.showPhoneNumberLabel.text = string2;
    }
}






@end
